
package com.monlyu.action.manuscript;

import java.util.Collections;
import java.util.List;

import com.monlyu.action.BaseAction;
import com.monlyu.bo.ManuscriptBo;
import com.monlyu.util.ActionUtil;
import com.monlyu.vo.Manuscript;

public class ListVaildScriptAction extends BaseAction {

    private ManuscriptBo manuscriptBo;
    private List<Manuscript> manuscripts;

    public List<Manuscript> getManuscripts(){
        return manuscripts;
    }

    public void setManuscriptBo(ManuscriptBo manuscriptBo){
        this.manuscriptBo = manuscriptBo;
    }

    // 例句所有可用的稿件
    @Override
    public String execute() throws Exception{
        decType = ActionUtil.SITEMESH_BODY;
        manuscripts = manuscriptBo.findValidScript(true);
        return view("validManuscript.jsp");
    }

    public String used() throws Exception{
        decType = ActionUtil.SITEMESH_BODY;
        manuscripts = manuscriptBo.findValidScript(false);
        return view("validManuscript.jsp");
    }
}
